<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {if count($product) > 0}
    {foreach name="$product" item="vo"}
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">{$vo['name']}</div>
                <div class="panel-body">

                    <div class="">
                        <!--                        <div id="toolbar" class="toolbar">-->
                        <!--                            <a id="patch" href="javascript:;" class="btn btn-success btn-add" title="{:__('批量')}"><i-->
                        <!--                                    class="fa fa-plus"></i>-->
                        <!--                                {:__('批量')}</a>-->
                        <!--                        </div>-->
                        <table class="table table-striped table-bordered table-hover table-nowrap profit-table"
                               style="text-align: center;">
                            <tr>
                                <th style="text-align: center;">政策</th>
                                <th style="text-align: center;">是否默认</th>
                                <th style="text-align: center;">操作</th>
                            </tr>
                            {if count($vo['policy']) > 0}
                            {foreach name="$vo['policy']" item="v"}
                            <tr>
                                <td>{$v.title}</td>
                                <td>{if $v.default == 1}是{else/}否 {/if}</td>
                                <td>
                                    {if $v.default != 1}
                                    <a id="default" href="javascript:;" data-id="{$v.id}" data-product="{$v.product_id}" class="btn btn-success btn-add">设置默认</a>
                                    {/if}
                                </td>
                            </tr>
                            {/foreach}
                            {else/}
                            <tr>暂无数据</tr>
                            {/if}
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {/foreach}
    {else/}
    <div>暂无数据</div>
    {/if}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
        </div>
    </div>
</form>
